import java.util.HashSet;
import java.util.Set;

public class StudentCountVisitor implements Visitor {
    private final Set<Student> students = new HashSet<>();

    @Override
    public void visit(Paper paper, Student student) {
        students.add(student);
    }

    @Override
    public Integer getResult() {
        return students.size();
    }
}    